<?php
class CommentController extends AppController {

	var $name = 'Comment';
	var $uses= array('Category');
	// menu chinh
	function subTop(){
		$lang=$this->Session->read('lag');
		return $this->Category->find('all',array('conditions'=>array('Category.lang_id'=>$lang,'Category.menu'=>1,'Category.parent_id'=>NULL),'order'=>'Category.order ASC'));
	}
	//lay danh muc con
	function subMenu(){
		$lang=$this->Session->read('lag');
		return $this->Category->find('all',array('conditions'=>array('Category.status'=>1,'Category.parent_id <>'=>NULL,'Category.lang_id'=>$lang)));	
	}
	//menu trai tin tuc
	function subMenuLeft(){
		$lang=$this->Session->read('lag');
		return $this->Category->find('all',array('conditions'=>array('Category.status'=>1,'Category.parent_id <>'=>NULL,'Category.lang_id'=>$lang,'Category.type'=>2)));	
	}
	//menu trai san pham
	function subMenuProduct(){
		$lang=$this->Session->read('lag');
		return $this->Category->find('all',array('conditions'=>array('Category.status'=>1,'Category.parent_id <>'=>NULL,'Category.lang_id'=>$lang,'Category.type'=>1)));	
	}
}
	

?>
